package com.oracle.controller;


import com.oracle.entity.CartItem;
import com.oracle.entity.ShoppingCart;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;


@Controller
@RequestMapping("")
public class CommonController {

    @RequestMapping("/adminLoginView")
    public String adminLoginView(){
        //进入后台登录页
        return "/admin/login";
    }

    @RequestMapping("/adminIndexView")
    public String adminIndexView()  {
        //只有通过后台的登录系统登录成功才能，进入页面
        return "/admin/index";
    }

    @RequestMapping("/adminCategoryView")
    public String adminCategoryView(){
        //类型添加页面
        return "/admin/category";
    }

    @RequestMapping("/adminCategoryLoadBookView")
    public String adminCategoryLoadBook(){
        //书本上架页面
        return "/admin/book";
    }

    @RequestMapping("/adminBookView")
    public String adminBookView(){
        //任何进入/adminBookView请求都会被拦截进入到/book/list
        //书本上架页面
        return "/admin/show";
    }

    @RequestMapping("/adminInfoView")
    public String adminInfoView(){
        //任何进入/adminBookView请求都会被拦截进入到/book/list
        //书本上架页面
        return "/admin/adminInfo";
    }


    //--------------------------------------------------------

    @RequestMapping("/user/front/indexView")
    public String frontIndexView(){
        return "/front/index";
    }

    @RequestMapping("/user/front/account")
    public String frontRegView(){
        return "/front/account";
    }


    @RequestMapping("/user/front/cart")
    public String cartItemIndex(){
        return "/front/cart";
    }

    @RequestMapping("/user/front/order")
    public String orderIndex(){
        return "/front/order";
    }

    @RequestMapping("/user/front/userinfo")
    public String userInfo(){
        return "/front/userinfo";
    }

    @RequestMapping("/user/front/address")
    public String address(){
        return "/front/address";
    }

    @RequestMapping("/user/front/orderover")
    public String orderover(){
        return "/front/orderover";
    }

}
